﻿<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="OrdersOrder.aspx.cs" Inherits="OrdersOrder" Title="OrdersOrder List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Orders Order List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="OrdersOrderDataSource"
				DataKeyNames="OrderId"
				AllowMultiColumnSorting="false"
				DefaultSortColumnName="" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_OrdersOrder.xls"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" />				
				<data:HyperLinkField HeaderText="Members Id" DataNavigateUrlFormatString="MembersEdit.aspx?MembersId={0}" DataNavigateUrlFields="MembersId" DataContainer="MembersIdSource" DataTextField="MembersName" />
				<asp:BoundField DataField="OrderDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Order Date" SortExpression="[Order_Date]"  />
				<asp:BoundField DataField="OrderQuantity" HeaderText="Order Quantity" SortExpression="[Order_Quantity]"  />
				<asp:BoundField DataField="OrderTotal" HeaderText="Order Total" SortExpression="[Order_Total]"  />
				<asp:BoundField DataField="ShippingName" HeaderText="Shipping Name" SortExpression="[Shipping_Name]"  />
				<asp:BoundField DataField="ShippingAddress" HeaderText="Shipping Address" SortExpression="[Shipping_Address]"  />
				<asp:BoundField DataField="ShippingTel" HeaderText="Shipping Tel" SortExpression="[Shipping_Tel]"  />
				<asp:BoundField DataField="ShippingCity" HeaderText="Shipping City" SortExpression="[Shipping_City]"  />
				<asp:BoundField DataField="ShippingNotice" HeaderText="Shipping Notice" SortExpression="[Shipping_Notice]"  />
				<data:BoundRadioButtonField DataField="IsActive" HeaderText="Is Active" SortExpression="[IsActive]"  />
			</Columns>
			<EmptyDataTemplate>
				<b>No OrdersOrder Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnOrdersOrder" OnClientClick="javascript:location.href='OrdersOrderEdit.aspx'; return false;" Text="Add New"></asp:Button>
		<data:OrdersOrderDataSource ID="OrdersOrderDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:OrdersOrderProperty Name="Members"/> 
					<%--<data:OrdersOrderProperty Name="ProductsIdProductsProductCollection_From_OrdersDetails" />--%>
					<%--<data:OrdersOrderProperty Name="OrdersDetailsCollection" />--%>
				</Types>
			</DeepLoadProperties>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:OrdersOrderDataSource>
	    		
</asp:Content>



